<%@ page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<html>
<head>
    <title>Title</title>
    <base href="http://${pageContext.request.serverName}:${pageContext.request.serverPort}${pageContext.request.contextPath}/">
    <script type="text/javascript" src="jquery/jquery-2.1.1.min.js"></script>
    <script src="layer/layer.js"></script>
    <script type="text/javascript">

        $(function () {

            $("#btn").click(function () {

                var array = [5,8,10];
                console.log(array.length);
                var responseBody = JSON.stringify(array);
                console.log(responseBody.length);

                $.ajax({
                    "url": "send/array.html",
                    "type": "post",
                    "data": responseBody,
                    "contentType": "application/json;charset=UTF-8",
                    "dataType": "text",
                    "success": function (response) {
                        alert(response);
                    },
                    "error": function (response) {
                        alert(response);
                    }
                });

            });

            $("#btn2").click(function () {
                layer.msg("叮咚")
            });

        });

    </script>
</head>
<body>

    <a href="test/ssm.html">测试SSM整合环境</a>
    <br/>
    <button id="btn">Send [5,8,10]</button>

    <button id="btn2">点击</button>

</body>
</html>
